<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>经济效益表</title>
<%@ include file="/common/util.jsp"%>


<script src="${cdnctx}/dep/Calendar/WdatePicker.js"></script>
<script src="${cdnctx}/dep/jquery/modernizr.js"></script>
<script src="${cdnctx}/dep/jquery/spin.js"></script>
<style type="text/css">
#preview {
	margin: 0 20px;
	float: left;
	border-radius: 10px;
}
</style>
<script type="text/javascript">
	errflag = false;
	function selectyear() {
		WdatePicker({
			skin : "whyGreen",
			dateFmt : "yyyy",
			readOnly : true,
			errDealMode : 1,
			maxDate : "%y-%M-%d"
		});
	}
	function checkquarter() {
		var quarter = $("#searchquarter").val();
		var searchyear = $("#searchyear").val();
		if (quarter != "0") {
			if (searchyear == "") {
				//$("#quartermsg").html("请选择年份！");
				$("#quartermsg").css("display", "block");
				errflag = true;
			} else {
				$("#quartermsg").css("display", "none");
			}

		} else {
			$("#quartermsg").css("display", "none");

		}
	}

	function endDateFocus() {
		WdatePicker({
			skin : "whyGreen",
			dateFmt : "yyyy-MM",
			errDealMode : 1,
			maxDate : "%y-%M-%d",
			oncleared : function() {
				$(this).blur();
			},
			onpicked : function() {
				$(this).blur();
			}
		})
	}
</script>
</head>
<body class="main">
	<div class="-frame -style -luster" id="css_container">
		<!--首页框架页眉部分↓-->
		<%@ include file="/WEB-INF/pages/inc/header.jsp"%>
		<!--首页框架页眉部分↑-->

		<div class="content">

			<!-- Left导航菜单◎开始 -->
			<%@ include file="/WEB-INF/pages/inc/leftmenu.jsp"%>
			<!-- Left导航菜单◎结束 -->

			<div class="main-mid">
				<div class="pos">
					<img src="${cdnctx}/src/index/img/index.png"><a
						href="${cdnctx}/reductoin/reductoinList.shtml">节能管理 </a>>
						<a>${customername}__经济效益</a> <span
						style="float: right; margin-right: 25px;">
							 <a
							href="${cdnctx}/socialBenefits/socialBenefitsList.shtml?companycode=${companycode }">社会效益</a>
							| <a
							href="${cdnctx}/bill/billList.shtml?companycode=${companycode }">账单生成</a></span>
				</div>
				<div class="css_contentDiv">
					<form id="economicBenefitForm"
						action="${cdnctx}/economicBenefit/EconomicBenefitscd.shtml"
						method="post">
						<div style="padding: 10px;">
							<input type="hidden" id="companycode" name="companycode"
								value="${companycode }" /> <label class="search_text">日期范围:&nbsp;</label>
							<input type="text" id="startDate" class="search_input Wdate"
								name="startDate" onblur=""
								onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});"
								value="${startDate }" />～<input type="text" id="endDate"
								class="search_input Wdate" name="endDate" onblur=""
								onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});"
								value="${endDate }" /> <input type="submit" class="search_btn"
								value="查&nbsp;询" />
						</div>
					</form>
					<div class="divTable">
						<div style="height: 600px; background-color: white">
							<table width="70%" border="0" cellspacing="0" cellpadding="0"
								class="list_table">
								<thead>
									<tr>
										<td>类别\项目</td>
										<td>耗电量(kw.h)</td>
										<c:forEach items="${elecPrices}" var="ePrice"
											varStatus="status">
											<td>电价${status.count }(元)</td>
										</c:forEach>
										<td>电费(元)</td>
										<td id="tdblue">节省电费(元)</td>
									</tr>
								</thead>
								<c:if test="${empty(energy) }">
									<tr class="even" align="center" style="color: red">
										<td colspan="5" class="no-data" style="height: 300px;"></td>
									</tr>
								</c:if>
								<c:if test="${not empty(energy) }">
									<tr>
										<td>传统灯具</td>
										<td><fmt:formatNumber value="${energy.traPower}"
												pattern="0.00" />&nbsp;</td>
										<c:forEach items="${elecPrices}" var="ePrice"
											varStatus="status">
											<td rowspan="2"><fmt:formatNumber
													value="${ePrice.unitprice}" pattern="0.0000" />&nbsp;</td>
										</c:forEach>
										<td><fmt:formatNumber value="${energy.traCost}"
												pattern="0.00" />&nbsp;</td>
										<td rowspan="2"><fmt:formatNumber
												value="${energy.saveCost}" pattern="0.00" />&nbsp;</td>
									</tr>
									<tr>
										<td>LED灯具</td>
										<td><fmt:formatNumber value="${energy.ledPower}"
												pattern="0.00" />&nbsp;</td>
										<td><fmt:formatNumber value="${energy.ledCost}"
												pattern="0.00" />&nbsp;</td>
									</tr>
								</c:if>
							</table>
							<br />
							<embed src="/animation/金猪/金猪${propertion}.swf" scale="noborder"
								width="100%" height="350" type="application/x-shockwave-flash"></embed>
						</div>
					</div>
				</div>
			</div>

		</div>

		<!--首页框架页尾部分↓-->
		<%@ include file="/WEB-INF/pages/inc/footer.jsp"%>
		<!--首页框架页尾部分↑-->
	</div>
</body>
</html>